package com.example.qxfw.nyqx.mapper;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.qxfw.common.entity.qx.drought;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
@DS("qx")
public interface DroughtMapper extends BaseMapper<drought> {

    @Select("select distinct rtrim(StationId, '') as StationId " +
            "from drought " )
    List<String> selectStationId();

    @Select("select dryobservationvalue, observationdate " +
            "from drought " +
            "where stationid='${stationId}' and observationdate between '${time1}' and '${time2}' and dryobservationvalue>-65535 ")
    List<drought> selectList1(String stationId, String time1, String time2);
}
